package io.kljf.boot.modules.sys.controller;

import io.kljf.boot.common.utils.Result;
import io.kljf.boot.modules.sys.entity.UserEntity;
import io.kljf.boot.modules.sys.services.IUserService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


@RestController
@RequestMapping("/sys/user")
public class UserController {

    @Autowired
    private IUserService userService;

    @GetMapping("/list")
    @ApiOperation("获取用户信息")
    public Result<List<UserEntity>> list(){
        List<UserEntity> list = userService.list();
        return  new Result<List<UserEntity>>().ok(list);
    }
}
